﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Seagull.Shell.Utils
{
    class IdleTimerWatcher : IMessageFilter
    {
        // constants from WinUser.h
        private const int WM_MOUSEMOVE = 0x0200;
        private const int WM_LBUTTONDOWN = 0x201;
        private const int WM_RBUTTONDOWN = 0x204;
        private const int WM_MBUTTONDOWN = 0x207;
        private const int WM_MOUSEWHEEL = 0x20A;
        private const int WM_KEYDOWN = 0x100;

        public bool PreFilterMessage(ref Message m)
        {
            switch(m.Msg)
            {
                case WM_MOUSEMOVE:
                case WM_LBUTTONDOWN:
                case WM_RBUTTONDOWN:
                case WM_MBUTTONDOWN:
                case WM_MOUSEWHEEL:
                case WM_KEYDOWN:
                    // Restart timer
//                    m_MainForm.RestartMonitor();
                    break;
            }
            return false;
        }
    }
}
